package collections;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;

public class LinkedHashMapTest1 {
    public static void main(String[] args) {
        ArrayList<Integer> a = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            a.add(i);
        }
        System.out.println(a);

        LinkedHashMap<Integer, Integer> map = new LinkedHashMap<>();
        map.putAll(a.stream().collect(Collectors.toMap(Function.identity(), Function.identity())));
        System.out.println(map.keySet());
    }
}
